package com.tiandao.mofang.core.richang;

import com.tiandao.mofang.core.RobotSingleton;
import com.tiandao.mofang.core.util.YiDong;
import com.tiandao.mofang.ui.MFFrame;

import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.util.Date;

/**
 * 日常类
 * 地点:杭州东财星相照
 * 需要材料(五种基础材料)齐全
 * 消耗2碎银
 * 可增加自动打怪机制
 * 完成时间 : 2020年8月17日22:05:02
 */
public class Hzdjcxxz implements Runnable{
    private static Robot robot = RobotSingleton.getInstance();

    public static void main(String[] args) {
       start();
    }
    @Override
    public void run() {
        start();
    }

    //开始
    public static void start(){
        try {
            Thread.sleep(5000);
            YiDong.yfsxqdt(1053,850,YiDong.QDT_HANG_ZHOU_Y);
            Thread.sleep(15000);
            MFFrame.textArea.append(new Date()+":    到达杭州!\n");
            robot.keyPress(KeyEvent.VK_6);
            robot.keyRelease(KeyEvent.VK_6);
            Thread.sleep(1500);
            YiDong.zouLu("2924","828");
            Thread.sleep(70000);
            MFFrame.textArea.append(new Date()+":    到达任务地点!\n");
            robot.keyPress(KeyEvent.VK_F);
            robot.keyRelease(KeyEvent.VK_F);
            Thread.sleep(2500);
            robot.mouseMove(993,498);
            Thread.sleep(1500);
            robot.mousePress(InputEvent.BUTTON1_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_MASK);
            robot.mouseMove(993,450);
            //等待
            Thread.sleep(15000);
            robot.mousePress(InputEvent.BUTTON1_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_MASK);
            Thread.sleep(2500);
            robot.mouseMove(993,498);
            Thread.sleep(15000);
            robot.mousePress(InputEvent.BUTTON1_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_MASK);
            robot.mouseMove(993,450);
            //等待
            Thread.sleep(15000);
            robot.mousePress(InputEvent.BUTTON1_MASK);
            robot.mouseRelease(InputEvent.BUTTON1_MASK);
            MFFrame.textArea.append(new Date()+":    日常完成!\n");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }


}
